package com.wgy.Day28异常.异常注意事项;
/*
如果finally里有return语句,永远返回finally中的结果,应避免这种情况
*/

public class Demo09异常注意事项finally {
    public static void main(String[] args) {
        int a = getA();
        System.out.println(a);
    }

    public static int  getA() {
        int a = 10;
        try {
            return a;
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            a = 100;
            return 100;
        }
    }

}
